package com.ss.io07;

import java.io.Serializable;

/**
 * @Auther: 520ljs
 * @Date: 2022/3/19 - 03 - 19 - 17:13
 */
public class Person implements Serializable {
    private static final long serialVersionUID = -3219398781663665685L;
    private String name;
    private int age;
    //static,transient修饰的属性，不可以被序列化
    /*private static String name;
    private transient int age;*/
    private Family f = new Family();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
